<%@ include file="/WEB-INF/jsp/include/taglib.jsp" %>
<h1>
    <a href="<c:url value="/forum.form"/>">
        <fmt:message key="app.forum.topic.list"/>
    </a>
    :
    <a href="<c:url value="/topic.form/${command.parent.id}"/>">
        <c:out value="${command.parent.header}"/>
    </a>
</h1>


<form action="<c:url value=""/>" method="post">

    <div class="entry">
        <div class="entry-left">
            <img src="/static-images/pic-post.gif">
        </div>
        <div class="entry-right">
            <div class="entry-data">
                <fmt:message key="app.forum.post.header"/>
                <spring:bind path="command.header">
                    <c:if test="${status.error}">
                        <p class="error"><fmt:message key="${status.errorCode}"/></p>
                    </c:if>
                    <input style="width:100%" type="text" name="${status.expression}" value="<c:out value="${status.value}"/>"/>
                </spring:bind>
            </div>
            <div class="entry-comment-add">
                <fmt:message key="app.forum.post.text"/>
                <spring:bind path="command.text">
                    <c:if test="${status.error}">
                        <p class="error"><fmt:message key="${status.errorCode}"/></p>
                    </c:if>
                    <textarea name="${status.expression}" rows="20" style="width: 100%;">${status.value}</textarea>
                </spring:bind>
            </div>
            <input type="submit" name="submit" value="<fmt:message key="app.forum.topic.submit"/>"/>
        </div>
    </div>
</form>
